package com.project.logistics.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project.logistics.bean.Notice;
import com.project.logistics.bean.Repairman;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * Created by94988 on 2021/3/21 15:19
 */
@Mapper
public interface NoticeMapper extends BaseMapper<Notice> {

    @Delete("delete from notice where notice_id = #{noticeId}")
    int deleteNotice(int noticeId);

    @Select("select * from notice where notice_id = #{noticeId}")
    Notice findNoticeById(int noticeId);

    @Update("update notice set notice_details = #{noticeDetails} where notice_id = #{noticeId}")
    int updateRepairman(Notice notice);

    @Select("select * from notice")
    List<Notice> getAllNotice();


}
